#include<stdio.h>
int fact(int n) {
	int product = 1;
	for (int i = 1; i <= n; i++) {
		product *= i;
	}
	return product;
}
int main() {
	int n = 0;
	scanf("%d", &n);
	int product = fact(n);
	printf("%d", product);
	return 0;
}
